act out of character

Translations
agir de façon inhabituelle
Definitions
To behave in a way that is unusual or not typical for a person, differing from their normal habits, personality, or expected behavior.